<script>
function goto_detail_page_of_product(url){
	location.href = url;
	return false;
}
$(document).ready(function(){
	<?php
	if(!empty($order_success_message)){
	?>
		alert('<?=$order_success_message?>');
	<?php
	}
	?>
});
</script>
<?php
if(!empty($auction_list)){
?>
<div id="AuctionBlockNormalSize">
	<?php
	for($i=0;$i<count($auction_list);$i++){
		$auction = $auction_list[$i];
		$auction_id = 'auction_'.$auction['id'];
	?>
	<div id="AuctionBlock" class="AuctionBlockContainer normalAuctionContainer">
		<div class="auction auctionBlock Auction Auction_status_IMMINENT Auction_status_PENDING Auction_status_NOBIDDER" id="<?=$auction_id?>">
		   <h2 class="productName"><a href="<?=get_detail_url_for_product($auction)?>"><?=$auction['title']?></a></h2>
		   <div class="auctionDetailsContainer">
				<div class="productPictureContainer">
					<a href="<?=get_detail_url_for_product($auction)?>">
						<img class="productPicture" src="<?=get_image_url_for_product($auction)?>" />
					</a>
				</div>
				<div class="auctionDetails">
					<div class="auctionInfos">
						<div class="productPriceContainer">
						   <div class="productValue ifNotDEALAUCTION">Giá : <strong><?=get_price_for_product($auction)?> <?=MONETARY_UNIT?></strong></div>
						   <div class="productValue ifNotDEALAUCTION"><strong>(<?=get_coin_by_price_for_product($auction)?> xu)</strong></div>
						</div>
					</div>
					<?php
					if(!empty($_SESSION['user']) && empty($auction['is_ended'])){
					?>
					<div class="auctionButtons">
						<div class="ifNotDEALAUCTION">
						   <div class="auctionButton auctionButtonSetAutoBid if ifPENDING ifIMMINENT ifSUSPENDED ifNotHOLD">
								<input type="submit" style="width:80px;" value="XEM" name="submit" onclick="return goto_detail_page_of_product('<?=get_detail_url_for_product($auction)?>')" />
						   </div>
						</div>
					</div>
					<?php
					}
					?>
				</div>
		   </div>
		</div>
	</div>
	<?php
	}
	?>
</div>
<?php
}
?>